<?php
/**
 * +--------------------------------------------------------+
 * @Created by Phpstorm.
 * @Category StockChartService.php
 * @Depiction
 * @Author hwy <429208948@qq.com>
 * @Date 2022/5/20  17:37
 * +--------------------------------------------------------+
 */

namespace App\Services\Swoole\Components;


use App\Models\Stock;
use App\Repositories\StockRepository;
use App\Services\StockService;
use Illuminate\Support\Facades\Cache;

class StockChartService implements ComponentsInterface
{
    public $ws;
    public $frame;

    /**
     * @return array
     * @Depiction
     * @Author hwy <429208948@qq.com>
     * @Date 2022/5/20  15:49
     */
    public function handle()
    {
        $cache_name = 'getMarketData';
        $data = Cache::tags(['stock_fund'])->get($cache_name);
        $res_data['data'] = $data;

        return $res = response_success_msg('请求成功！', $res_data);
    }

}
